<div id="content-header">
    <div id="breadcrumb"> 
    	<a  title="Go to Home" class="tip-bottom">
    		<i class="icon-home"></i> 基础设置</a> 
    		<a ui-sref="{{current.name}}" class="current">基础设置
    	</a> 
    </div>
  </div>
  <div class="col-sm-12 col-md-5" style="padding-top: 50px;width: 100%;">
	<!--<div class="dt-buttons btn-group">
		<a class="btn btn-primary buttons-copy buttons-html5" tabindex="0" aria-controls="datatable-buttons" href="#"><span>Copy</span></a>
		<a class="btn btn-success buttons-excel buttons-html5" tabindex="0" aria-controls="datatable-buttons" href="#"><span>Excel</span></a>
		<a class="btn btn-danger buttons-pdf buttons-html5" tabindex="0" aria-controls="datatable-buttons" href="#"><span>PDF</span></a>
	</div>-->
	<button ng-click="columnAdd('','add')" class="btn  btn-primary btnheight">添加</button>
	<div class="col-md-13">
		<div id="datatable-buttons_filter" class="dataTables_filter" >
			<label>
				<input type="search" ng-model="key" class="form-control inputweight" 
					placeholder="" aria-controls="datatable-buttons">
					<button  class="btn  btn-primary btnheight btn-inquiry" ng-click="search()">查询</button>
			</label>
			
		</div>
	</div>
</div>
  <div class="container-fluid">
    <div class="row-fluid">
      <div class="span12">
 
			<div class="widget-box">
          <div class="widget-content nopadding">
            <table class="table table-bordered data-table">
              <thead>
                <tr>
                  <th width="10%">编号</th>
                  <th width="30%">名称</th>
                  <th width="30%">说明</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody>
                <tr class="gradeX" bindonce ng-repeat="o in list">
                  <td bo-text="$index+1"></td>
                  <td bo-text="o.diName"></td>
                   <td bo-text="o.dgDecription|fil"></td>
                  <td>
                  	<button ng-click="columnAdd(o.diId,'up')" class="btn  btn-primary">修改</button>
                  	<button class="btn  btn-danger" ng-click="modelClick(o.diId)">删除</button>
                  </td>
                </tr>
                 <tr class="gradeX"  ng-if="totalSize==0||totalSize==undefined"  class="even">
	            	<td colspan="5"> 暂无数据</td>
	           	</tr>
              </tbody>
            </table>
            
           
          </div>
        </div>
         <div class="fy" ng-if="totalSize>0">
									<p>共<span>{{totalSize}}</span>条记录，<span>{{pageNum}}</span>/<span>{{totalNum}}</span>页</p>
									<ul uib-pagination 
										first-text="首页" 
										last-text='末页' 
										next-text='下一页' 
										previous-text='上一页' 
										total-items="totalSize" 
										items-per-page='pageSize' 
										boundary-link-numbers='true' 
										max-size='3' boundary-links='true' 
										ng-model="$parent.tj.current" 
										ng-change='search(tj.current)'>
									</ul>
									<p>到第<input placeholder="{{pageNum}}" ng-change="pageUp()" ng-model="$parent.tj.page" />页</p>
									<span ng-click="toPage($parent.tj.page)">前往</span>
			</div>
					
      </div>
    </div>
<script type="text/ng-template" id="columnAdd.html">
			<style>
				.modal-content{
					width: 600px;
					margin-left: 180px;
				}
				.table_input{
					width:256px;text-indent: .1rem;height: 36px;
				}
				.table_span{
					display: block;width:100px;
				}
				
			</style>
			<div class="modal-header" style="text-align: center;font-size: 24px;background: #4092E8;color: white;height:50px;line-height: 50px">
				<div style="margin-top: -8px;">
					{{sername}}
				</div>
				<button style="color:white;float: right;background: #4092e8;border: none;outline: none;box-shadow: none;margin-top: -35px;" class="btn " type="button" ng-click="cancel()">[关闭]</button>
			</div>
			<div class="modal-body" >
				<div class="adduser" >

					<div style="    margin-left: 40px;">
						<form novalidate="novalidate" name="form">
							<div style="margin: 10px 0;display: flex;align-items: center;">
								<span class="table_span" >名称：</span>
								<input class="table_input"    type="text" value="" name="name" ng-model="name" required>
								<span class="error bigError "  ng-show="form.name.$error.required" style="font-size: 18px;font-weight: bold;">*</span>
							</div>
							<div style="margin: 10px 0;display: flex;align-items: center;">
								<span class="table_span" >排序：</span>
								<input class="table_input"    type="text" value="" name="pPlace" ng-model="pPlace" required>
								<span class="error bigError "  
									ng-show="form.pPlace.$error.required" style="font-size: 18px;font-weight: bold;">*</span>
							</div>
							<div style="margin: 10px 0;display: flex;align-items: center;">
								<span class="table_span">说明：</span>
								<textarea ng-model="dgDecription" rows="3" cols="50">
								</textarea>
							</div>
						</form>

					</div>
				</div>
			</div>
			<div class="modal-footer" style="position: relative;height:50px;">
				<div style="display: flex;justify-content: flex-end;padding: 0;position: absolute;right: 20px;top: 0.1rem;">
					
					<button  class="" ng-disabled="form.$invalid" ng-class="{true:'btn btn-primary'}[form.$invalid]" 
						style="width: 100px;border-radius: 0;line-height: 32px;background-color:#4092e8 ;border:#4092e8 ; font-size: 13px;color: white;font-size: 14px;margin-top: 5px;"
						ng-click="ok(form.$invalid)">保 存</button>
				</div>
			</div>
		</script>
